package site.teamo.biu.net.common.web.controller;

import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import site.teamo.biu.tool.core.exception.BiuResponseCode;
import site.teamo.biu.tool.core.model.BiuJSONResult;
import site.teamo.biu.tool.core.util.BiuJSONResultUtils;

/**
 * @author haocongshun
 * @date 2023/03/07 17:29:35
 */
@Hidden
@RestController
public class ExceptionController {

    @RequestMapping("/exception")
    public BiuJSONResult<Object> exception(@RequestAttribute BiuResponseCode responseCode) {
        return BiuJSONResultUtils.error(responseCode);
    }

}
